package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 考勤记录对象 attendance_record
 */
public class AttendanceRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 上班打卡时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "上班打卡时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date checkInTime;

    /** 下班打卡时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下班打卡时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date checkOutTime;

    /** 上班打卡方式（NORMAL-正常，AUTO-自动，MANUAL-手动） */
    @Excel(name = "上班打卡方式", readConverterExp = "NORMAL=正常,AUTO=自动,MANUAL=手动")
    private String checkInMethod;

    /** 下班打卡方式（NORMAL-正常，AUTO-自动，MANUAL-手动） */
    @Excel(name = "下班打卡方式", readConverterExp = "NORMAL=正常,AUTO=自动,MANUAL=手动")
    private String checkOutMethod;

    /** 考勤日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "考勤日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date workDate;

    /** 考勤状态（NORMAL-正常，LATE-迟到，EARLY_LEAVE-早退，ABSENT-缺勤，EXCEPTION-异常） */
    @Excel(name = "考勤状态", readConverterExp = "NORMAL=正常,LATE=迟到,EARLY_LEAVE=早退,ABSENT=缺勤,EXCEPTION=异常")
    private String status;

    /** 是否已提醒（0-未提醒，1-已提醒） */
    @Excel(name = "是否已提醒", readConverterExp = "0=未提醒,1=已提醒")
    private Integer reminded;

    /** 备注信息 */
    @Excel(name = "备注信息")
    private String notes;

    // 移除 createdTime 和 updatedTime，因为 BaseEntity 中已包含

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setCheckInTime(Date checkInTime)
    {
        this.checkInTime = checkInTime;
    }

    public Date getCheckInTime()
    {
        return checkInTime;
    }

    public void setCheckOutTime(Date checkOutTime)
    {
        this.checkOutTime = checkOutTime;
    }

    public Date getCheckOutTime()
    {
        return checkOutTime;
    }

    public void setCheckInMethod(String checkInMethod)
    {
        this.checkInMethod = checkInMethod;
    }

    public String getCheckInMethod()
    {
        return checkInMethod;
    }

    public void setCheckOutMethod(String checkOutMethod)
    {
        this.checkOutMethod = checkOutMethod;
    }

    public String getCheckOutMethod()
    {
        return checkOutMethod;
    }

    public void setWorkDate(Date workDate)
    {
        this.workDate = workDate;
    }

    public Date getWorkDate()
    {
        return workDate;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setReminded(Integer reminded)
    {
        this.reminded = reminded;
    }

    public Integer getReminded()
    {
        return reminded;
    }

    public void setNotes(String notes)
    {
        this.notes = notes;
    }

    public String getNotes()
    {
        return notes;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("checkInTime", getCheckInTime())
                .append("checkOutTime", getCheckOutTime())
                .append("checkInMethod", getCheckInMethod())
                .append("checkOutMethod", getCheckOutMethod())
                .append("workDate", getWorkDate())
                .append("status", getStatus())
                .append("reminded", getReminded())
                .append("notes", getNotes())
                .toString();
    }
}